package com.audi.box.service;

import java.util.ArrayList;

import com.audi.box.adapter.SQLiteAsusHelperSmartTrigger;
import com.audi.dto.SmartTriggerWhenTriggerItem;

public class SmartTriggerWhenTriggerServiceImp implements
        SmartTriggerWhenTriggerService {
    
    private SQLiteAsusHelperSmartTrigger mSQLHelper;
    
    public SmartTriggerWhenTriggerServiceImp(
            SQLiteAsusHelperSmartTrigger mSQLHelper) throws Exception {
        this.mSQLHelper = mSQLHelper;
    }
    
    public void setSQLiteHelper(SQLiteAsusHelperSmartTrigger mSQLHelper) {
        this.mSQLHelper = mSQLHelper;
    }
    
    @Override
    public int addSmartTriggerWhenTrigger(SmartTriggerWhenTriggerItem trigger) {
        return mSQLHelper.addTriggerWhenTrigger(trigger);
    }
    
    @Override
    public int updateSmartTriggerWhenTrigger(SmartTriggerWhenTriggerItem trigger) {
        return mSQLHelper.updateSmartTriggerWhenTrigger(trigger);
    }
    
    @Override
    public boolean isExist(SmartTriggerWhenTriggerItem trigger) {
        return false;
    }
    
    @Override
    public ArrayList<SmartTriggerWhenTriggerItem> getListSmartTriggerWhenTrigger() {
        return mSQLHelper.getSmartTrigerWhenTriggerList();
    }
    
    @Override
    public SmartTriggerWhenTriggerItem getSmartTrigger(int whenTriggerId) {
        // TODO Auto-generated method stub
        return null;
    }
    
    @Override
    public int deleteSmartTriggerWhenTrigger(SmartTriggerWhenTriggerItem trigger) {
        return mSQLHelper.deleleSmartTriggerWhenTrigger(trigger);
    }
    
    @Override
    public int setOnOffSmartTrigger(SmartTriggerWhenTriggerItem trigger) {
        return mSQLHelper.setOnOffSmartTrigger(trigger);
    }
    
}
